<template>
  <div id="awardwinninglist"> 


          <el-table :data="datalist" style="width: 100%" :height="dtheight" :header-cell-style="{background:'#4F81BC',color:'white'}"
          :row-class-name="tableRowClassName"  :border="true">
                
                 <el-table-column label="注册时间"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ getNowDateSjc(scope.row.createtime *1000) }}</span>
                    </template>
                </el-table-column>
               
                <el-table-column label="奖励类型"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span v-if="scope.row.type == 'CASH'">金蛋</span>
                        <span v-if="scope.row.type == 'RANGE_CASH'">彩蛋</span>
                    </template>
                </el-table-column>
                <el-table-column label="数量"  align='center' >                   
                    <template slot-scope="scope">                   
                        <span >{{ scope.row.price }}{{ getNowDateSjc(scope.row.createtime *1000) }}</span>
                    </template>
                </el-table-column>
                  <el-table-column label="操作" align='center' width="450px"  fixed="right">
                    <template slot-scope="scope">
                        <el-button size="mini"  type="primary"  plain class="button_class1" @click="delect_but(scope.row)">删除</el-button> 
                    </template>
                </el-table-column>
                
 
           </el-table>  

   </div>
</template>
<script>
export default {
   name: 'awardwinninglist',
   props:{
      datalist:{  
        //type:Array,
       default:()=>[]
     },
  },
  data () {
    return {
        dtheight:'500',  //窗口高度
    }
  },
   components:{

  },
  created(){
     this.dtheight = window.innerHeight - 295
      
  },
  mounted (){
    
  },
  methods: {
  
  delect_but(row){
       
        this.$confirm('是否删除?', '提示', {
          confirmButtonText: '确定',
          cancelButtonText: '取消',
          type: 'warning'
        }).then(() => {
             this.post("/marketer/delWinPrizeLog", {
                    id:row.id,
                }).then(res => {
                    if(res.error_code == 0){
                      this.open1(res.result,'success')  //提示框
                     this.$emit('up_list_fun')
                     
                    }else {
                    this.open1(res.message,'warning')
                    }

              })
        })


    },

  }
}
</script>


<style scoped>

</style>